

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Activity &mdash; Apache Usergrid 2.x documentation</title>
  

  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
  

  

  
    <link rel="top" title="Apache Usergrid 2.x documentation" href="../index.html"/>
        <link rel="next" title="Social Graph Connections" href="user-connections.html"/>
        <link rel="prev" title="Working with group data" href="group.html"/> 

  
  <script src="../_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-nav-search">
        

        
          <a href="../index.html" class="icon icon-home"> Apache Usergrid
        

        
        </a>

        
          
          
            <div class="version">
              2.x
            </div>
          
        

        
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

        
      </div>

      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
        
          
          
              <p class="caption"><span class="caption-text">Getting Started</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../introduction/overview.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="../introduction/usergrid-features.html">Usergrid Features</a></li>
<li class="toctree-l1"><a class="reference internal" href="../introduction/data-model.html">Usergrid Data model</a></li>
<li class="toctree-l1"><a class="reference internal" href="../introduction/async-vs-sync.html">Async vs. sync calls</a></li>
</ul>
<p class="caption"><span class="caption-text">Using Usergrid</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../using-usergrid/creating-account.html">Creating a Usergrid Account</a></li>
<li class="toctree-l1"><a class="reference internal" href="../using-usergrid/creating-a-new-application.html">Creating a new application</a></li>
<li class="toctree-l1"><a class="reference internal" href="../using-usergrid/using-a-sandbox-app.html">Using a Sandbox Application</a></li>
<li class="toctree-l1"><a class="reference internal" href="../using-usergrid/using-the-api.html">Using the API</a></li>
</ul>
<p class="caption"><span class="caption-text">Data Storage</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../data-storage/data-store-dbms.html">The Usergrid Data Store</a></li>
<li class="toctree-l1"><a class="reference internal" href="../data-storage/optimizing-access.html">Data Store Best Practices</a></li>
<li class="toctree-l1"><a class="reference internal" href="../data-storage/collections.html">Collections</a></li>
<li class="toctree-l1"><a class="reference internal" href="../data-storage/entities.html">Entities</a></li>
</ul>
<p class="caption"><span class="caption-text">Data Queries</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../data-queries/querying-your-data.html">Querying your data</a></li>
<li class="toctree-l1"><a class="reference internal" href="../data-queries/query-parameters.html">Query parameters &amp; clauses</a></li>
<li class="toctree-l1"><a class="reference internal" href="../data-queries/operators-and-types.html">Query operators &amp; data types</a></li>
<li class="toctree-l1"><a class="reference internal" href="../data-queries/advanced-query-usage.html">Advanced query usage</a></li>
</ul>
<p class="caption"><span class="caption-text">Entity Connections</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../entity-connections/connecting-entities.html">Connecting entities</a></li>
<li class="toctree-l1"><a class="reference internal" href="../entity-connections/retrieving-entities.html">Retrieving connections</a></li>
<li class="toctree-l1"><a class="reference internal" href="../entity-connections/disconnecting-entities.html">Disconnecting entities</a></li>
</ul>
<p class="caption"><span class="caption-text">Push Notifications</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../push-notifications/overview.html">Push notifications overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="../push-notifications/adding-push-support.html">Adding push notifications support</a></li>
<li class="toctree-l1"><a class="reference internal" href="../push-notifications/getting-started.html">Getting started with push notifications</a></li>
<li class="toctree-l1"><a class="reference internal" href="../push-notifications/tutorial.html">Tutorial: Push notifications sample app</a></li>
<li class="toctree-l1"><a class="reference internal" href="../push-notifications/registering.html">Registering with a notification service</a></li>
<li class="toctree-l1"><a class="reference internal" href="../push-notifications/creating-notifiers.html">Creating notifiers</a></li>
<li class="toctree-l1"><a class="reference internal" href="../push-notifications/managing-users-and-devices.html">Managing users and devices</a></li>
<li class="toctree-l1"><a class="reference internal" href="../push-notifications/creating-and-managing-notifications.html">Creating and managing notifications</a></li>
<li class="toctree-l1"><a class="reference internal" href="../push-notifications/troubleshooting.html">Troubleshooting</a></li>
</ul>
<p class="caption"><span class="caption-text">Security &amp; Authentication</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/app-security.html">Security &amp; token authentication</a></li>
<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/using-permissions.html">Using permissions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/using-roles.html">Using roles</a></li>
<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/authenticating-users-and-application-clients.html">Authenticating users &amp; app clients</a></li>
<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/user-authentication-types.html">Authentication levels</a></li>
<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/changing-token-time-live-ttl.html">Changing token expiration (time-to-live)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/authenticating-api-requests.html">Authenticating API requests</a></li>
<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/revoking-tokens-logout.html">Revoking tokens (logout)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/facebook-sign.html">Facebook sign in</a></li>
<li class="toctree-l1"><a class="reference internal" href="../security-and-auth/securing-your-app.html">Security best practices</a></li>
</ul>
<p class="caption"><span class="caption-text">User Management &amp; Social Graph</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="user-management.html">User management &amp; social graph</a></li>
<li class="toctree-l1"><a class="reference internal" href="working-user-data.html">Working with User Data</a></li>
<li class="toctree-l1"><a class="reference internal" href="group.html">Working with group data</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="">Activity</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#posting-activities">Posting activities</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#request-uri">Request URI</a></li>
<li class="toctree-l3"><a class="reference internal" href="#example-request">Example - Request</a></li>
<li class="toctree-l3"><a class="reference internal" href="#example-response">Example - Response</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#posting-an-activity-to-a-group">Posting an activity to a group</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id1">Request URI</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id2">Example - Request</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id3">Example - Response</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#creating-an-activity-for-a-user-s-followers-in-a-group">Creating an activity for a user&#8217;s followers in a group</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id4">Request URI</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id5">Example - Request</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id6">Example - Response</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#retrieving-activity-feeds">Retrieving activity feeds</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id7">Request URI</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id8">Example - Request</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id9">Example - Response</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#retrieving-a-group-s-activity-feed">Retrieving a group&#8217;s activity feed</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id10">Request URI</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id11">Example - Request</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id12">Example - Response</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="user-connections.html">Social Graph Connections</a></li>
<li class="toctree-l1"><a class="reference internal" href="user-connections.html#creating-other-connections">Creating other connections</a></li>
<li class="toctree-l1"><a class="reference internal" href="messagee-example.html">App Example - Messagee</a></li>
</ul>
<p class="caption"><span class="caption-text">Geo-location</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../geolocation/geolocation.html">Geolocating your Entities</a></li>
</ul>
<p class="caption"><span class="caption-text">Assets &amp; Files</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../assets-and-files/uploading-assets.html">Uploading assets</a></li>
<li class="toctree-l1"><a class="reference internal" href="../assets-and-files/retrieving-assets.html">Retrieving assets</a></li>
<li class="toctree-l1"><a class="reference internal" href="../assets-and-files/folders.html">Folders</a></li>
</ul>
<p class="caption"><span class="caption-text">Counters &amp; Events</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../counters-and-events/events-and-counters.html">Counters &amp; events</a></li>
<li class="toctree-l1"><a class="reference internal" href="../counters-and-events/creating-and-incrementing-counters.html">Creating &amp; incrementing counters</a></li>
<li class="toctree-l1"><a class="reference internal" href="../counters-and-events/creating-and-incrementing-counters.html#decrementing-resetting-counters">Decrementing/resetting counters</a></li>
<li class="toctree-l1"><a class="reference internal" href="../counters-and-events/creating-and-incrementing-counters.html#using-counters-hierarchically">Using counters hierarchically</a></li>
<li class="toctree-l1"><a class="reference internal" href="../counters-and-events/retrieving-counters.html">Retrieving counters</a></li>
</ul>
<p class="caption"><span class="caption-text">Organizations &amp; Applications</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../orgs-and-apps/managing.html">Organization &amp; application management</a></li>
<li class="toctree-l1"><a class="reference internal" href="../orgs-and-apps/organization.html">Organization</a></li>
<li class="toctree-l1"><a class="reference internal" href="../orgs-and-apps/application.html">Application</a></li>
<li class="toctree-l1"><a class="reference internal" href="../orgs-and-apps/admin-user.html">Admin user</a></li>
</ul>
<p class="caption"><span class="caption-text">API Reference</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../rest-endpoints/api-docs.html">Methods</a></li>
<li class="toctree-l1"><a class="reference internal" href="../rest-endpoints/api-docs.html#models">Models</a></li>
<li class="toctree-l1"><a class="reference internal" href="../rest-endpoints/api-docs.html#sub-types">Sub-Types</a></li>
</ul>
<p class="caption"><span class="caption-text">Client SDKs</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../sdks/tbd.html">COMING SOON...</a></li>
</ul>
<p class="caption"><span class="caption-text">Installing Usergrid</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../installation/deployment-guide.html">Usergrid 2.1.0 Deployment Guide</a></li>
</ul>
<p class="caption"><span class="caption-text">More about Usergrid</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../reference/presos-and-videos.html">Presentations &amp; Videos</a></li>
<li class="toctree-l1"><a class="reference internal" href="../reference/contribute-code.html">How to Contribute Code &amp; Docs</a></li>
</ul>

          
        
      </div>
      &nbsp;
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
        <a href="../index.html">Apache Usergrid</a>
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="breadcrumbs navigation">
  <ul class="wy-breadcrumbs">
    <li><a href="../index.html">Docs</a> &raquo;</li>
      
    <li>Activity</li>
      <li class="wy-breadcrumbs-aside">
        
          
            <a href="../_sources/user-management/activity.txt" rel="nofollow"> View page source</a>
          
        
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="activity">
<h1>Activity<a class="headerlink" href="#activity" title="Permalink to this headline">¶</a></h1>
<p>Most modern applications struggle to manage data streams, such as those
that contain an ongoing list of comments, activities, and tweets. In
particular, mobile applications are prone to generating very large
amounts of data in a data stream. Beyond that, additions to a data
stream must often be routed automatically to subscribers or filtered or
counted.</p>
<p>Usergrid provides an activity entity that is specifically designed for
data streams. An activity is an entity type that represents activity
stream actions (see the <a class="reference external" href="http://activitystrea.ms/specs/json/1.0/">JSON Activity Streams 1.0
specification</a> for more
information about these actions).</p>
<p>When a user creates an activity, it creates a relationship between the
activity and the user who created it. Because this relationship exists,
the activity will appear in the feed of any of the user’s followers.
Think of the Activities endpoint (<code class="docutils literal"><span class="pre">/users/{uuid|username}/activities</span></code>)
as an &#8220;outbox&#8221; of news items created by the user. Think of the Feed
endpoint (<code class="docutils literal"><span class="pre">/users/{uuid|username}/feed</span></code>) as an &#8220;inbox&#8221; of news items
meant to be seen or consumed by the user.</p>
<p>A user can also post an activity to a group (located at
<code class="docutils literal"><span class="pre">/groups/{uuid|groupname}/activities</span></code>). This allows you to emulate
Facebook-style group functionality, where a limited number of users can
share content on a common &#8220;wall&#8221;. In any of these cases, there is no
need to construct publish/subscribe relationships manually.</p>
<p>Activity entities are particularly useful in applications that enable
users to post content to activity streams (also called feeds) and to
display activity streams. Some examples of these applications are
Twitter, foursquare, and Pinterest.&nbsp;For example, when a Twitter user
posts a short, 140-character or less, &#8220;tweet&#8221;, that activity gets added
to the user&#8217;s activity stream for display as well as to the activity
streams of any of the user&#8217;s followers.</p>
<p>Using Usergrid APIs you can create, retrieve, update, and delete
activity entities.</p>
<p><strong>Note:</strong>&nbsp;Although not shown in the API examples below, you need to
provide a valid access token with each API call. See <a class="reference external" href="../security-and-auth/authenticating-users-and-application-clients.html">Authenticating
users and application
clients</a>
for details.</p>
<div class="section" id="posting-activities">
<h2>Posting activities<a class="headerlink" href="#posting-activities" title="Permalink to this headline">¶</a></h2>
<p>Posting a user activity</p>
<p>Use the POST method to create an activity in the activities collection.</p>
<div class="section" id="request-uri">
<h3>Request URI<a class="headerlink" href="#request-uri" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>POST /&lt;org_id&gt;/&lt;app_id&gt;/users/&lt;uuid | username&gt;/activities { request body }
</pre></div>
</div>
<p>Parameters</p>
<table border="1" class="docutils">
<colgroup>
<col width="39%" />
<col width="61%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Parameter</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>arg uuid|string org_id</td>
<td>Organization UUID or organization name</td>
</tr>
<tr class="row-odd"><td>arg uuid|string app_id</td>
<td>Application UUID or application name</td>
</tr>
<tr class="row-even"><td>request body</td>
<td>One or more sets of activity properties</td>
</tr>
</tbody>
</table>
<p>Here&#8217;s an example request body:</p>
<div class="highlight-python"><div class="highlight"><pre>{
    &quot;actor&quot;:{
        &quot;displayName&quot;:&quot;John Doe&quot;,
        &quot;uuid&quot;:&quot;1f3567aa-da83-11e1-afad-12313b01d5c1&quot;,
        &quot;username&quot;:&quot;john.doe&quot;,
        &quot;image&quot;:{
            &quot;duration&quot;:0,
            &quot;height&quot;:80,
            &quot;url&quot;:&quot;http://www.gravatar.com/avatar/&quot;,&quot;width&quot;:80},
            &quot;email&quot;:&quot;john.doe@gmail.com&quot;
        },
        &quot;verb&quot;:&quot;post&quot;,
        &quot;content&quot;:&quot;Hello World!&quot;
    }
}
</pre></div>
</div>
</div>
<div class="section" id="example-request">
<h3>Example - Request<a class="headerlink" href="#example-request" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>curl -X POST &quot;https://api.usergrid.com/my-org/my-app/users/john.doe/activities&quot; -d &#39;{&quot;actor&quot;:{&quot;displayName&quot;:&quot;John Doe&quot;,&quot;uuid&quot;:&quot;1f3567aa-da83-11e1-afad-12313b01d5c1&quot;,&quot;username&quot;:&quot;john.doe&quot;, &quot;image&quot;:{&quot;duration&quot;:0,&quot;height&quot;:80,&quot;url&quot;:&quot;http://www.gravatar.com/avatar/&quot;,&quot;width&quot;:80}, &quot;email&quot;:&quot;john.doe@gmail.com&quot;},&quot;verb&quot;:&quot;post&quot;,&quot;content&quot;:&quot;Hello World!&quot;}&#39;
</pre></div>
</div>
</div>
<div class="section" id="example-response">
<h3>Example - Response<a class="headerlink" href="#example-response" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre><span class="p">{</span>
    <span class="s">&quot;action&quot;</span> <span class="p">:</span> <span class="s">&quot;post&quot;</span><span class="p">,</span>
    <span class="s">&quot;application&quot;</span> <span class="p">:</span> <span class="s">&quot;5111c463-6a42-11e1-b6dd-1231380a0284&quot;</span><span class="p">,</span>
     <span class="s">&quot;params&quot;</span> <span class="p">:</span> <span class="p">{</span>
    <span class="p">},</span>
    <span class="s">&quot;path&quot;</span> <span class="p">:</span> <span class="s">&quot;/users/1f3567aa-da83-11e1-afad-12313b01d5c1/activities&quot;</span><span class="p">,</span>
    <span class="s">&quot;uri&quot;</span> <span class="p">:</span> <span class="s">&quot;https://api.usergrid.com/5111c463-6a42-11e1-b6dd-1231380a0284/users/1f3567aa-da83-11e1-afad-12313b01d5c1/activities&quot;</span><span class="p">,</span>
    <span class="s">&quot;entities&quot;</span> <span class="p">:</span> <span class="p">[</span> <span class="p">{</span>
        <span class="s">&quot;uuid&quot;</span> <span class="p">:</span> <span class="s">&quot;da448955-f3aa-11e1-8042-12313d331ae8&quot;</span><span class="p">,</span>
        <span class="s">&quot;type&quot;</span> <span class="p">:</span> <span class="s">&quot;activity&quot;</span><span class="p">,</span>
        <span class="s">&quot;created&quot;</span> <span class="p">:</span> <span class="mi">1346445092974</span><span class="p">,</span>
        <span class="s">&quot;modified&quot;</span> <span class="p">:</span> <span class="mi">1346445092974</span><span class="p">,</span>
        <span class="s">&quot;actor&quot;</span> <span class="p">:</span> <span class="p">{</span>
            <span class="s">&quot;displayName&quot;</span> <span class="p">:</span> <span class="s">&quot;John Doe&quot;</span><span class="p">,</span>
            <span class="s">&quot;uuid&quot;</span> <span class="p">:</span> <span class="s">&quot;1f3567aa-da83-11e1-afad-12313b01d5c1&quot;</span><span class="p">,</span>
            <span class="s">&quot;username&quot;</span> <span class="p">:</span> <span class="s">&quot;john.doe&quot;</span><span class="p">,</span>
            <span class="s">&quot;image&quot;</span> <span class="p">:</span> <span class="p">{</span>
                <span class="s">&quot;duration&quot;</span> <span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
                <span class="s">&quot;height&quot;</span> <span class="p">:</span> <span class="mi">80</span><span class="p">,</span>
                <span class="s">&quot;url&quot;</span> <span class="p">:</span> <span class="s">&quot;http://www.gravatar.com/avatar/&quot;</span><span class="p">,</span>
                <span class="s">&quot;width&quot;</span> <span class="p">:</span> <span class="mi">80</span>
            <span class="p">},</span>
            <span class="s">&quot;email&quot;</span> <span class="p">:</span> <span class="s">&quot;john.doe@gmail.com&quot;</span>
        <span class="p">},</span>
        <span class="s">&quot;content&quot;</span> <span class="p">:</span> <span class="s">&quot;Hello World!&quot;</span><span class="p">,</span>
        <span class="s">&quot;metadata&quot;</span> <span class="p">:</span> <span class="p">{</span>
            <span class="s">&quot;path&quot;</span> <span class="p">:</span> <span class="s">&quot;/users/1f3567aa-da83-11e1-afad-12313b01d5c1/activities/da448955-f3aa-11e1-8042-12313d331ae8&quot;</span>
        <span class="p">},</span>
        <span class="s">&quot;published&quot;</span> <span class="p">:</span> <span class="mi">1346445092974</span><span class="p">,</span>
        <span class="s">&quot;verb&quot;</span> <span class="p">:</span> <span class="s">&quot;post&quot;</span>
    <span class="p">}</span> <span class="p">],</span>
    <span class="s">&quot;timestamp&quot;</span> <span class="p">:</span> <span class="mi">1346445092827</span><span class="p">,</span>
    <span class="s">&quot;duration&quot;</span> <span class="p">:</span> <span class="mi">1406</span><span class="p">,</span>
    <span class="s">&quot;organization&quot;</span><span class="p">:</span> <span class="s">&quot;my-org&quot;</span><span class="p">,</span>
    <span class="s">&quot;applicationName&quot;</span><span class="p">:</span> <span class="s">&quot;my-app&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
<p><strong>Note</strong>: Anytime a logged-in user makes a request, you can substitute
&#8220;me&#8221; for the uuid or username. So the format of a request to create an
activity for the currently logged-in user would look like this:</p>
<div class="highlight-python"><div class="highlight"><pre>POST /&lt;org_id&gt;/&lt;app_id&gt;/users/me/activities { request body }
</pre></div>
</div>
<p>The <code class="docutils literal"><span class="pre">/users/me</span></code> endpoint is accessible only if you provide an access
token with the request. If you don&#8217;t provide an access token with the
request, that is, you make an anonymous (or &#8220;guest&#8221;) call, the system
will not be able to determine which user to return as <code class="docutils literal"><span class="pre">/users/me</span></code>.</p>
<p>When you create an activity it creates a relationship between the
activity and the user who created it. In other words, the newly created
activity above belongs to john.doe. Another way of saying this is the
user &#8220;owns&#8221; the activity. And because this relationship exists, the
activity will appear in the feed of any of the user’s followers (in this
example, anyone who is following john.doe). However, it will not appear
in the feed of people the user follows. The activity is accessible at
the <code class="docutils literal"><span class="pre">/activities</span></code> endpoint to users who have the permission to read
that endpoint.</p>
<p>Notice the properties specified in the request body in the previous
example are actor, verb, and content. The actor, verb, and content
properties are built into the Activity entity (see <a class="reference external" href="../rest-endpoints/api-doc.html#activity">Activity entity
properties</a> ). The actor
property specifies properties of the entity that performs the action
(here, user john.doe). The gravatar URL is used to create an icon for
the activity. And because an Activity is simply an API Services data
entity, you can also create custom properties.</p>
<p>The verb parameter is descriptive. You can use it to indicate what type
of activity is posted, for example, an image versus text. The value post
is defined in the JSON Activity Streams specification as “the act of
authoring an object and then publishing it online.“</p>
</div>
</div>
<div class="section" id="posting-an-activity-to-a-group">
<h2>Posting an activity to a group<a class="headerlink" href="#posting-an-activity-to-a-group" title="Permalink to this headline">¶</a></h2>
<p>Use the POST method to post an activity to a specific group. In this
case the activity is created in the activities collection and is
accessible at the <code class="docutils literal"><span class="pre">/activities</span></code> endpoint to users who have the
permission to read that endpoint. In addition, a relationship is
established between the activity and the group, and because of that, the
activity will appear in the group’s feed. The group &#8220;owns&#8221; the activity.
Also, the activity will be published in the feed of all users that are
members of the group.</p>
<div class="section" id="id1">
<h3>Request URI<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>POST /{org_id}/{app_id}/groups/{uuid|groupname}/activities {request body}
</pre></div>
</div>
<p>Parameters</p>
<table border="1" class="docutils">
<colgroup>
<col width="41%" />
<col width="59%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Parameter</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>arg uuid|string org_id</td>
<td>Organization UUID or organization name</td>
</tr>
<tr class="row-odd"><td>arg uuid|string app_id</td>
<td>Application UUID or application name</td>
</tr>
<tr class="row-even"><td>arg uuid|string groupname</td>
<td>UUID or name of the group</td>
</tr>
<tr class="row-odd"><td>request body</td>
<td>One or more sets of activity properties.</td>
</tr>
</tbody>
</table>
<p>Here&#8217;s a sample request body:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">{</span>
  <span class="s">&quot;actor&quot;</span><span class="p">:</span>
    <span class="p">{</span>
    <span class="s">&quot;displayName&quot;</span><span class="p">:</span><span class="s">&quot;John Doe&quot;</span><span class="p">,</span>
    <span class="s">&quot;uuid&quot;</span><span class="p">:</span><span class="s">&quot;1f3567aa-da83-11e1-afad-12313b01d5c1&quot;</span><span class="p">,</span>
    <span class="s">&quot;username&quot;</span><span class="p">:</span><span class="s">&quot;john.doe&quot;</span><span class="p">,</span>
    <span class="s">&quot;image&quot;</span><span class="p">:{</span>
      <span class="s">&quot;duration&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
      <span class="s">&quot;height&quot;</span><span class="p">:</span><span class="mi">80</span><span class="p">,</span>
      <span class="s">&quot;url&quot;</span><span class="p">:</span><span class="s">&quot;http://www.gravatar.com/avatar/&quot;</span><span class="p">,</span><span class="s">&quot;width&quot;</span><span class="p">:</span><span class="mi">80</span><span class="p">},</span>
  <span class="s">&quot;email&quot;</span><span class="p">:</span><span class="s">&quot;john.doe@gmail.com&quot;</span><span class="p">},</span>
  <span class="s">&quot;verb&quot;</span><span class="p">:</span><span class="s">&quot;post&quot;</span><span class="p">,</span>
  <span class="s">&quot;content&quot;</span><span class="p">:</span><span class="s">&quot;Hello World!&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="id2">
<h3>Example - Request<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>curl -X POST &quot;https://api.usergrid.com/my-org/my-app/groups/mygroup/activities&quot; -d &#39;{&quot;actor&quot;:{&quot;displayName&quot;:&quot;John Doe&quot;,&quot;uuid&quot;:&quot;1f3567aa-da83-11e1-afad-12313b01d5c1&quot;,&quot;username&quot;:&quot;john.doe&quot;, &quot;image&quot;:{&quot;duration&quot;:0,&quot;height&quot;:80,&quot;url&quot;:&quot;http://www.gravatar.com/avatar/&quot;,&quot;width&quot;:80}, &quot;email&quot;:&quot;john.doe@gmail.com&quot;},&quot;verb&quot;:&quot;post&quot;,&quot;content&quot;:&quot;Hello World!&quot;}&#39;
</pre></div>
</div>
<p>Because this relationship exists, this activity will appear in the feed
of all users who are members of mygroup. It won&#8217;t appear in the feeds of
the group members’ followers or in feeds of users they follow.</p>
</div>
<div class="section" id="id3">
<h3>Example - Response<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre><span class="p">{</span>
  <span class="s">&quot;action&quot;</span><span class="p">:</span> <span class="s">&quot;post&quot;</span><span class="p">,</span>
  <span class="s">&quot;application&quot;</span><span class="p">:</span> <span class="s">&quot;3400ba10-cd0c-11e1-bcf7-12313d1c4491&quot;</span><span class="p">,</span>
  <span class="s">&quot;params&quot;</span><span class="p">:</span>  <span class="p">{},</span>
  <span class="s">&quot;path&quot;</span><span class="p">:</span> <span class="s">&quot;/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/activities&quot;</span><span class="p">,</span>
  <span class="s">&quot;uri&quot;</span><span class="p">:</span> <span class="s">&quot;https://api.usergrid.com/my-org/my-app/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/activities&quot;</span><span class="p">,</span>
  <span class="s">&quot;entities&quot;</span><span class="p">:</span>  <span class="p">[</span>
     <span class="p">{</span>
      <span class="s">&quot;uuid&quot;</span><span class="p">:</span> <span class="s">&quot;563f5d96-37f3-11e2-a0f7-02e81ae640dc&quot;</span><span class="p">,</span>
      <span class="s">&quot;type&quot;</span><span class="p">:</span> <span class="s">&quot;activity&quot;</span><span class="p">,</span>
      <span class="s">&quot;created&quot;</span><span class="p">:</span> <span class="mi">1353952903811</span><span class="p">,</span>
      <span class="s">&quot;modified&quot;</span><span class="p">:</span> <span class="mi">1353952903811</span><span class="p">,</span>
      <span class="s">&quot;actor&quot;</span><span class="p">:</span>  <span class="p">{</span>
        <span class="s">&quot;displayName&quot;</span><span class="p">:</span> <span class="s">&quot;John Doe&quot;</span><span class="p">,</span>
        <span class="s">&quot;uuid&quot;</span><span class="p">:</span> <span class="s">&quot;1f3567aa-da83-11e1-afad-12313b01d5c1&quot;</span><span class="p">,</span>
        <span class="s">&quot;username&quot;</span><span class="p">:</span> <span class="s">&quot;john.doe&quot;</span><span class="p">,</span>
        <span class="s">&quot;image&quot;</span><span class="p">:</span>  <span class="p">{</span>
          <span class="s">&quot;duration&quot;</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
          <span class="s">&quot;height&quot;</span><span class="p">:</span> <span class="mi">80</span><span class="p">,</span>
          <span class="s">&quot;url&quot;</span><span class="p">:</span> <span class="s">&quot;http://www.gravatar.com/avatar/&quot;</span><span class="p">,</span>
          <span class="s">&quot;width&quot;</span><span class="p">:</span> <span class="mi">80</span>
        <span class="p">},</span>
        <span class="s">&quot;email&quot;</span><span class="p">:</span> <span class="s">&quot;john.doe@gmail.com&quot;</span>
      <span class="p">},</span>
      <span class="s">&quot;content&quot;</span><span class="p">:</span> <span class="s">&quot;Hello World!&quot;</span><span class="p">,</span>
      <span class="s">&quot;metadata&quot;</span><span class="p">:</span>  <span class="p">{</span>
        <span class="s">&quot;path&quot;</span><span class="p">:</span> <span class="s">&quot;/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/activities/563f5d96-37f3-11e2-a0f7-02e81ae640dc&quot;</span>
      <span class="p">},</span>
      <span class="s">&quot;published&quot;</span><span class="p">:</span> <span class="mi">1353952903811</span><span class="p">,</span>
      <span class="s">&quot;verb&quot;</span><span class="p">:</span> <span class="s">&quot;post&quot;</span>
    <span class="p">}</span>
  <span class="p">],</span>
  <span class="s">&quot;timestamp&quot;</span><span class="p">:</span> <span class="mi">1353952903800</span><span class="p">,</span>
  <span class="s">&quot;duration&quot;</span><span class="p">:</span> <span class="mi">81</span><span class="p">,</span>
  <span class="s">&quot;organization&quot;</span><span class="p">:</span> <span class="s">&quot;my-org&quot;</span><span class="p">,</span>
  <span class="s">&quot;applicationName&quot;</span><span class="p">:</span> <span class="s">&quot;my-app&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="creating-an-activity-for-a-user-s-followers-in-a-group">
<h2>Creating an activity for a user&#8217;s followers in a group<a class="headerlink" href="#creating-an-activity-for-a-user-s-followers-in-a-group" title="Permalink to this headline">¶</a></h2>
<p>Use the POST method to create an activity that will be published only in
the feeds of users who (1) follow you, and (2) are in the same group to
which you posted the activity. This is useful if you want to create
specific groups of friends (for example, acquaintances or colleagues)
and publish content to them with more precise privacy settings. This
allows you to re-create a privacy model similar to Google+’s Circles or
Facebook current privacy system.</p>
<p>When you create an activity for a user’s followers in a group:</p>
<p>The activity is accessible at the <code class="docutils literal"><span class="pre">/activities</span></code> endpoint to users who
have the permission to read that endpoint. The activity will not be
cross-posted to the group’s activity endpoint
(<code class="docutils literal"><span class="pre">/groups/{uuid|groupname}/activities</span></code>) A relationship is
automatically created between the activity entity that was just created
and the user within that group
(<code class="docutils literal"><span class="pre">/groups/{uuid|groupname}/users/{uuid|username}</span></code>) The user within the
group (<code class="docutils literal"><span class="pre">/groups/{uuid|groupname}/users/{uuid|username}</span></code>) becomes the
owner of the activity (through the owner property in the activity).</p>
<div class="section" id="id4">
<h3>Request URI<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>POST /{org_id}/{app_id}/groups/{uuid|groupname}/users/{uuid|username}/activities {request body}
</pre></div>
</div>
<p>Parameters</p>
<p>Parameter Description arg uuid|string org_id Organization UUID or
organization name arg uuid|string app_id Application UUID or
application name arg uuid|string groupname UUID or name of the group
arg uuid|string username UUID or name of the user request body One or
more sets of activity properties</p>
<p>Example request body:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">{</span>
  <span class="s">&quot;actor&quot;</span><span class="p">:</span>
    <span class="p">{</span>
    <span class="s">&quot;displayName&quot;</span><span class="p">:</span><span class="s">&quot;John Doe&quot;</span><span class="p">,</span>
    <span class="s">&quot;uuid&quot;</span><span class="p">:</span><span class="s">&quot;1f3567aa-da83-11e1-afad-12313b01d5c1&quot;</span><span class="p">,</span>
    <span class="s">&quot;username&quot;</span><span class="p">:</span><span class="s">&quot;john.doe&quot;</span><span class="p">,</span>
    <span class="s">&quot;image&quot;</span><span class="p">:{</span>
      <span class="s">&quot;duration&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
      <span class="s">&quot;height&quot;</span><span class="p">:</span><span class="mi">80</span><span class="p">,</span>
      <span class="s">&quot;url&quot;</span><span class="p">:</span><span class="s">&quot;http://www.gravatar.com/avatar/&quot;</span><span class="p">,</span><span class="s">&quot;width&quot;</span><span class="p">:</span><span class="mi">80</span><span class="p">},</span>
  <span class="s">&quot;email&quot;</span><span class="p">:</span><span class="s">&quot;john.doe@gmail.com&quot;</span><span class="p">},</span>
  <span class="s">&quot;verb&quot;</span><span class="p">:</span><span class="s">&quot;post&quot;</span><span class="p">,</span>
  <span class="s">&quot;content&quot;</span><span class="p">:</span><span class="s">&quot;Hello World!&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="id5">
<h3>Example - Request<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>curl -X POST &quot;https://api.usergrid.com/my-org/my-app/groups/mygroup/users/john.doe/activities&quot; -d &#39;{&quot;actor&quot;:{&quot;displayName&quot;:&quot;John Doe&quot;,&quot;uuid&quot;:&quot;1f3567aa-da83-11e1-afad-12313b01d5c1&quot;,&quot;username&quot;:&quot;john.doe&quot;, &quot;image&quot;:{&quot;duration&quot;:0,&quot;height&quot;:80,&quot;url&quot;:&quot;http://www.gravatar.com/avatar/&quot;,&quot;width&quot;:80}, &quot;email&quot;:&quot;john.doe@gmail.com&quot;},&quot;verb&quot;:&quot;post&quot;,&quot;content&quot;:&quot;Hello World!&quot;}&#39;
</pre></div>
</div>
<p>Because this relationship exists, this activity will appear in the feed
of all users who are members of mygroup. It won&#8217;t appear in the feeds of
the group members’ followers or in feeds of users they follow.</p>
</div>
<div class="section" id="id6">
<h3>Example - Response<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>{
  &quot;action&quot; : &quot;post&quot;,
  &quot;application&quot; : &quot;3400ba10-cd0c-11e1-bcf7-12313d1c4491&quot;,
  &quot;params&quot; : { },
  &quot;path&quot; : &quot;/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/34e26bc9-2d00-11e2-a065-02e81ae640dc/activities&quot;,
  &quot;uri&quot; : &quot;https://api.usergrid.com/my-org/my-app/
/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/34e26bc9-2d00-11e2-a065-02e81ae640dc/activities&quot;,
  &quot;entities&quot; : [ {
    &quot;uuid&quot; : &quot;2440ca58-49ff-11e2-84c0-02e81adcf3d0&quot;,
    &quot;type&quot; : &quot;activity&quot;,
    &quot;created&quot; : 1355937094825,
    &quot;modified&quot; : 1355937094825,
    &quot;actor&quot; : {
      &quot;displayName&quot; : &quot;John Doe&quot;,
      &quot;uuid&quot; : &quot;1f3567aa-da83-11e1-afad-12313b01d5c1&quot;,
      &quot;username&quot; : &quot;john.doe&quot;,
      &quot;image&quot; : {
        &quot;duration&quot; : 0,
        &quot;height&quot; : 80,
        &quot;url&quot; : &quot;http://www.gravatar.com/avatar/&quot;,
        &quot;width&quot; : 80
      },
      &quot;email&quot; : &quot;john.doe@gmail.com&quot;
    },
    &quot;content&quot; : &quot;Happy New Year!&quot;,
    &quot;metadata&quot; : {
      &quot;path&quot; : &quot;/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/34e26bc9-2d00-11e2-a065-02e81ae640dc/activities/2440ca58-49ff-11e2-84c0-02e81adcf3d0&quot;
    },
    &quot;published&quot; : 1355937094825,
    &quot;verb&quot; : &quot;post&quot;
  } ],
  &quot;timestamp&quot; : 1355937094789,
  &quot;duration&quot; : 95,
  &quot;organization&quot; : &quot;my-org&quot;,
  &quot;applicationName&quot; : &quot;my-app&quot;
}
</pre></div>
</div>
</div>
</div>
<div class="section" id="retrieving-activity-feeds">
<h2>Retrieving activity feeds<a class="headerlink" href="#retrieving-activity-feeds" title="Permalink to this headline">¶</a></h2>
<p>Retrieving a user&#8217;s activity feed</p>
<p>Use the GET method to retrieve a user’s feed.</p>
<div class="section" id="id7">
<h3>Request URI<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre><span class="n">GET</span> <span class="o">/</span><span class="p">{</span><span class="n">org_id</span><span class="p">}</span><span class="o">/</span><span class="p">{</span><span class="n">app_id</span><span class="p">}</span><span class="o">/</span><span class="n">users</span><span class="o">/</span><span class="p">{</span><span class="n">uuid</span><span class="o">|</span><span class="n">username</span><span class="p">}</span><span class="o">/</span><span class="n">feed</span>
</pre></div>
</div>
</div>
<div class="section" id="id8">
<h3>Example - Request<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>curl -X GET &quot;https://api.usergrid.com/my-org/my-app/users/john.doe/feed&quot;
</pre></div>
</div>
</div>
<div class="section" id="id9">
<h3>Example - Response<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre><span class="p">{</span>
  <span class="s">&quot;action&quot;</span> <span class="p">:</span> <span class="s">&quot;get&quot;</span><span class="p">,</span>
  <span class="s">&quot;application&quot;</span> <span class="p">:</span> <span class="s">&quot;3400ba10-cd0c-11e1-bcf7-12313d1c44914&quot;</span><span class="p">,</span>
  <span class="s">&quot;params&quot;</span> <span class="p">:</span> <span class="p">{},</span>
  <span class="s">&quot;path&quot;</span> <span class="p">:</span> <span class="s">&quot;/users/d9693ec3-61c9-11e2-9ffc-02e81adcf3d0/feed&quot;</span><span class="p">,</span>
  <span class="s">&quot;uri&quot;</span> <span class="p">:</span> <span class="s">&quot;https://api.usergrid.com/3400ba10-cd0c-11e1-bcf7-12313d1c44914/users/d9693ec3-61c9-11e2-9ffc-02e81adcf3d0/feed&quot;</span><span class="p">,</span>
  <span class="s">&quot;entities&quot;</span> <span class="p">:</span> <span class="p">[</span> <span class="p">{</span>
    <span class="s">&quot;uuid&quot;</span> <span class="p">:</span> <span class="s">&quot;ffd79647-f399-11e1-aec3-12313b06ae01&quot;</span><span class="p">,</span>
    <span class="s">&quot;type&quot;</span> <span class="p">:</span> <span class="s">&quot;activity&quot;</span><span class="p">,</span>
    <span class="s">&quot;created&quot;</span> <span class="p">:</span> <span class="mi">1346437854569</span><span class="p">,</span>
    <span class="s">&quot;modified&quot;</span> <span class="p">:</span> <span class="mi">1346437854569</span><span class="p">,</span>
    <span class="s">&quot;actor&quot;</span> <span class="p">:</span> <span class="p">{</span>
      <span class="s">&quot;displayName&quot;</span> <span class="p">:</span> <span class="s">&quot;John Doe&quot;</span><span class="p">,</span>
      <span class="s">&quot;image&quot;</span> <span class="p">:</span> <span class="p">{</span>
        <span class="s">&quot;duration&quot;</span> <span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
        <span class="s">&quot;height&quot;</span> <span class="p">:</span> <span class="mi">80</span><span class="p">,</span>
        <span class="s">&quot;url&quot;</span> <span class="p">:</span> <span class="s">&quot;http://www.gravatar.com/avatar/&quot;</span><span class="p">,</span>
        <span class="s">&quot;width&quot;</span> <span class="p">:</span> <span class="mi">80</span>
      <span class="p">},</span>
      <span class="s">&quot;uuid&quot;</span> <span class="p">:</span> <span class="s">&quot;d9693ec3-61c9-11e2-9ffc-02e81adcf3d0&quot;</span><span class="p">,</span>
      <span class="s">&quot;email&quot;</span> <span class="p">:</span> <span class="s">&quot;john.doe@gmail.com&quot;</span><span class="p">,</span>
      <span class="s">&quot;username&quot;</span> <span class="p">:</span> <span class="s">&quot;john.doe&quot;</span>
    <span class="p">},</span>
    <span class="s">&quot;content&quot;</span> <span class="p">:</span> <span class="s">&quot;Hello World!&quot;</span><span class="p">,</span>
    <span class="s">&quot;metadata&quot;</span> <span class="p">:</span> <span class="p">{</span>
      <span class="s">&quot;cursor&quot;</span> <span class="p">:</span> <span class="s">&quot;gGkAAQMAgGkABgE5ffM1aQCAdQAQ_9eWR_OZEeGuwxIxOwauAQCAdQAQABlaOvOaEeGuwxIxOwauAQA&quot;</span><span class="p">,</span>
      <span class="s">&quot;path&quot;</span> <span class="p">:</span> <span class="s">&quot;/users/d9693ec3-61c9-11e2-9ffc-02e81adcf3d0/feed/ffd79647-f399-11e1-aec3-12313b06ae01&quot;</span>
    <span class="p">},</span>
    <span class="s">&quot;published&quot;</span> <span class="p">:</span> <span class="mi">1346437854569</span><span class="p">,</span>
    <span class="s">&quot;verb&quot;</span> <span class="p">:</span> <span class="s">&quot;post&quot;</span>
  <span class="p">},</span> <span class="p">{</span>
    <span class="s">&quot;uuid&quot;</span> <span class="p">:</span> <span class="s">&quot;2482a1c5-e7d0-11e1-96f6-12313b06d112&quot;</span><span class="p">,</span>
    <span class="s">&quot;type&quot;</span> <span class="p">:</span> <span class="s">&quot;activity&quot;</span><span class="p">,</span>
    <span class="s">&quot;created&quot;</span> <span class="p">:</span> <span class="mi">1345141694958</span><span class="p">,</span>
    <span class="s">&quot;modified&quot;</span> <span class="p">:</span> <span class="mi">1345141694958</span><span class="p">,</span>
    <span class="s">&quot;actor&quot;</span> <span class="p">:</span> <span class="p">{</span>
      <span class="s">&quot;displayName&quot;</span> <span class="p">:</span> <span class="s">&quot;moab&quot;</span><span class="p">,</span>
      <span class="s">&quot;image&quot;</span> <span class="p">:</span> <span class="p">{</span>
        <span class="s">&quot;duration&quot;</span> <span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
        <span class="s">&quot;height&quot;</span> <span class="p">:</span> <span class="mi">80</span><span class="p">,</span>
        <span class="s">&quot;url&quot;</span> <span class="p">:</span> <span class="s">&quot;http://www.gravatar.com/avatar/&quot;</span><span class="p">,</span>
        <span class="s">&quot;width&quot;</span> <span class="p">:</span> <span class="mi">80</span>
      <span class="p">},</span>
      <span class="s">&quot;uuid&quot;</span> <span class="p">:</span> <span class="s">&quot;d9693ec3-61c9-11e2-9ffc-02e81adcf3d0&quot;</span><span class="p">,</span>
      <span class="s">&quot;email&quot;</span> <span class="p">:</span> <span class="s">&quot;massoddb@mfdsadfdsaoabl.com&quot;</span><span class="p">,</span>
      <span class="s">&quot;username&quot;</span> <span class="p">:</span> <span class="s">&quot;moab&quot;</span>
    <span class="p">},</span>
    <span class="s">&quot;content&quot;</span> <span class="p">:</span> <span class="s">&quot;checking in code left and right!!&quot;</span><span class="p">,</span>
    <span class="s">&quot;metadata&quot;</span> <span class="p">:</span> <span class="p">{</span>
      <span class="s">&quot;cursor&quot;</span> <span class="p">:</span> <span class="s">&quot;gGkAAQMAgGkABgE5MLFh7gCAdQAQJIKhxefQEeGW9hIxOwbREgCAdQAQJNEP6ufQEeGW9hIxOwbREgA&quot;</span><span class="p">,</span>
      <span class="s">&quot;path&quot;</span> <span class="p">:</span> <span class="s">&quot;/users/d9693ec3-61c9-11e2-9ffc-02e81adcf3d0/feed/2482a1c5-e7d0-11e1-96f6-12313b06d112&quot;</span>
    <span class="p">},</span>
    <span class="s">&quot;published&quot;</span> <span class="p">:</span> <span class="mi">1345141694958</span><span class="p">,</span>
    <span class="s">&quot;verb&quot;</span> <span class="p">:</span> <span class="s">&quot;post&quot;</span>
  <span class="p">}</span> <span class="p">],</span>
  <span class="s">&quot;timestamp&quot;</span> <span class="p">:</span> <span class="mi">1346438331316</span><span class="p">,</span>
  <span class="s">&quot;duration&quot;</span> <span class="p">:</span> <span class="mi">144</span><span class="p">,</span>
  <span class="s">&quot;organization&quot;</span><span class="p">:</span> <span class="s">&quot;my-org&quot;</span><span class="p">,</span>
  <span class="s">&quot;applicationName&quot;</span><span class="p">:</span> <span class="s">&quot;my-app&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="retrieving-a-group-s-activity-feed">
<h2>Retrieving a group&#8217;s activity feed<a class="headerlink" href="#retrieving-a-group-s-activity-feed" title="Permalink to this headline">¶</a></h2>
<p>Use the GET method to retrieve the feed for a group. This gets a list of
all the activities that have been posted to this group, that is, the
activities for which this group has a relationship (owns).</p>
<div class="section" id="id10">
<h3>Request URI<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre><span class="n">GET</span> <span class="o">/</span><span class="p">{</span><span class="n">org_id</span><span class="p">}</span><span class="o">/</span><span class="p">{</span><span class="n">app_id</span><span class="p">}</span><span class="o">/</span><span class="n">groups</span><span class="o">/</span><span class="p">{</span><span class="n">uuid</span><span class="o">|</span><span class="n">groupname</span><span class="p">}</span><span class="o">/</span><span class="n">feed</span>
</pre></div>
</div>
<p>Parameters</p>
<table border="1" class="docutils">
<colgroup>
<col width="24%" />
<col width="76%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Parameter</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>arg uuid|str</td>
<td>ing org_id Organization UUID or organization name</td>
</tr>
<tr class="row-odd"><td>arg uuid|str</td>
<td>ing app_id Application UUID or application name</td>
</tr>
<tr class="row-even"><td>arg uuid|str</td>
<td>ing groupname UUID or name of the group</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id11">
<h3>Example - Request<a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>curl -X GET &quot;https://api.usergrid.com/my-org/my-app/groups/mygroup/feed&quot;
</pre></div>
</div>
</div>
<div class="section" id="id12">
<h3>Example - Response<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre><span class="p">{</span>
    <span class="s">&quot;action&quot;</span><span class="p">:</span> <span class="s">&quot;get&quot;</span><span class="p">,</span>
    <span class="s">&quot;application&quot;</span><span class="p">:</span> <span class="s">&quot;3400ba10-cd0c-11e1-bcf7-12313d1c4491&quot;</span><span class="p">,</span>
    <span class="s">&quot;params&quot;</span><span class="p">:</span>  <span class="p">{},</span>
    <span class="s">&quot;path&quot;</span><span class="p">:</span> <span class="s">&quot;/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/feed&quot;</span><span class="p">,</span>
    <span class="s">&quot;uri&quot;</span><span class="p">:</span> <span class="s">&quot;https://api.usergrid.com/my-org/my-app/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/feed&quot;</span><span class="p">,</span>
    <span class="s">&quot;entities&quot;</span><span class="p">:</span>  <span class="p">[</span>
       <span class="p">{</span>
        <span class="s">&quot;uuid&quot;</span><span class="p">:</span> <span class="s">&quot;563f5d96-37f3-11e2-a0f7-02e81ae640dc&quot;</span><span class="p">,</span>
        <span class="s">&quot;type&quot;</span><span class="p">:</span> <span class="s">&quot;activity&quot;</span><span class="p">,</span>
        <span class="s">&quot;created&quot;</span><span class="p">:</span> <span class="mi">1353952903811</span><span class="p">,</span>
        <span class="s">&quot;modified&quot;</span><span class="p">:</span> <span class="mi">1353952903811</span><span class="p">,</span>
        <span class="s">&quot;actor&quot;</span><span class="p">:</span>  <span class="p">{</span>
          <span class="s">&quot;displayName&quot;</span><span class="p">:</span> <span class="s">&quot;John Doe&quot;</span><span class="p">,</span>
          <span class="s">&quot;image&quot;</span><span class="p">:</span>  <span class="p">{</span>
            <span class="s">&quot;duration&quot;</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
            <span class="s">&quot;height&quot;</span><span class="p">:</span> <span class="mi">80</span><span class="p">,</span>
            <span class="s">&quot;url&quot;</span><span class="p">:</span> <span class="s">&quot;http://www.gravatar.com/avatar/&quot;</span><span class="p">,</span>
            <span class="s">&quot;width&quot;</span><span class="p">:</span> <span class="mi">80</span>
          <span class="p">},</span>
          <span class="s">&quot;uuid&quot;</span><span class="p">:</span> <span class="s">&quot;1f3567aa-da83-11e1-afad-12313b01d5c1&quot;</span><span class="p">,</span>
          <span class="s">&quot;email&quot;</span><span class="p">:</span> <span class="s">&quot;john.doe@gmail.com&quot;</span><span class="p">,</span>
        <span class="s">&quot;username&quot;</span><span class="p">:</span> <span class="s">&quot;john.doe&quot;</span>
        <span class="p">},</span>
        <span class="s">&quot;content&quot;</span><span class="p">:</span> <span class="s">&quot;Hello World!&quot;</span><span class="p">,</span>
        <span class="s">&quot;metadata&quot;</span><span class="p">:</span>  <span class="p">{</span>
          <span class="s">&quot;cursor&quot;</span><span class="p">:</span> <span class="s">&quot;gGkAAQMAgGkABgE7PeHCgwCAdQAQVj9dljfzEeKg9wLoGuZA3ACAdQAQVkVRCTfzEeKg9wLoGuZA3AA&quot;</span><span class="p">,</span>
          <span class="s">&quot;path&quot;</span><span class="p">:</span> <span class="s">&quot;/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/feed/563f5d96-37f3-11e2-a0f7-02e81ae640dc&quot;</span>
        <span class="p">},</span>
        <span class="s">&quot;published&quot;</span><span class="p">:</span> <span class="mi">1353952903811</span><span class="p">,</span>
        <span class="s">&quot;verb&quot;</span><span class="p">:</span> <span class="s">&quot;post&quot;</span>
      <span class="p">}</span>
    <span class="p">],</span>
  <span class="s">&quot;timestamp&quot;</span><span class="p">:</span> <span class="mi">1353953272756</span><span class="p">,</span>
  <span class="s">&quot;duration&quot;</span><span class="p">:</span> <span class="mi">29</span><span class="p">,</span>
  <span class="s">&quot;organization&quot;</span><span class="p">:</span> <span class="s">&quot;my-org&quot;</span><span class="p">,</span>
  <span class="s">&quot;applicationName&quot;</span><span class="p">:</span> <span class="s">&quot;my-app&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
</div>


           </div>
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="user-connections.html" class="btn btn-neutral float-right" title="Social Graph Connections" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="group.html" class="btn btn-neutral" title="Working with group data" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2013-2015, Apache Usergrid.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'../',
            VERSION:'2.x',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true
        };
    </script>
      <script type="text/javascript" src="../_static/jquery.js"></script>
      <script type="text/javascript" src="../_static/underscore.js"></script>
      <script type="text/javascript" src="../_static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="../_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>